package com.weixing.mall.util;

import cn.hutool.core.util.NumberUtil;

import java.math.BigDecimal;
import java.math.RoundingMode;

/**
 * @ClassName ArithUtil
 * @Description
 * @Author Small
 * @Date 2020/1/15 15:34
 * @Version 1.0
 **/
public class ArithUtil {

    public static BigDecimal mul(Number num1,Number num2){
        return NumberUtil.mul(num1,num2);
    }




    public static void main(String[] args) {
        BigDecimal mul = mul(1.25D, 2.5D);
        System.out.println(mul.doubleValue());
        System.out.println(NumberUtil.round(mul,2, RoundingMode.HALF_UP));
        System.out.println(NumberUtil.decimalFormatMoney(mul.doubleValue()));
    }
}
